<?php
	//获取账号密码
	$userName = $_GET['un'];
	$passWord = $_GET['pw'];
	//1.链接数据库
	$link = mysqli_connect('127.0.0.1','root','root','sn');
	//2.执行操作
	$sql = "INSERT INTO `userinfo` values (null,'$userName','$passWord')";
	//3.解析结果
	$result = mysqli_query($link,$sql);
	if($result){
		$ar = array('code' => 1);
		echo json_encode($ar);
	}
	//4.断开链接
	mysqli_close($link);
?>